<%@ page import="java.util.List" %>
<%@ page import="com.situ.web.entity.Banji" %><%--
  Created by IntelliJ IDEA.
  User: 24186
  Date: 2022-01-29
  Time: 19:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="/JavaWeb/static/bootstrap-3.4.1-dist/css/bootstrap.css"/>
</head>
<body>

    <%
        List<Banji> list = (List<Banji>) request.getAttribute("banjiList");
    %>

    <form class="form-horizontal" action="<%=request.getContextPath()%>/student?method=insert" method="post">
        <div class="form-group">
            <label for="name" class="col-sm-2 control-label">姓名</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="name" name="name" placeholder="name">
            </div>
        </div>
        <div class="form-group">
            <label for="age" class="col-sm-2 control-label">年龄</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="age" name="age" placeholder="age">
            </div>
        </div>
<%--        <div class="form-group">--%>
<%--            <label for="gender" class="col-sm-2 control-label">性别</label>--%>
<%--            <div class="col-sm-10">--%>
<%--                <input type="text" class="form-control" id=gender name="gender" placeholder="gender">--%>
<%--            </div>--%>
<%--        </div>--%>
        <div class="form-group">
            <label for="gender" class="col-sm-2 control-label">性别</label>
            <div class="col-sm-10">
                <select type="text" class="form-control" id=gender name="gender" placeholder="gender">
                    <option value="null">未选定</option>
                    <option value="男">男</option>
                    <option value="女">女</option>
                </select>
                <%--                <input type="text" class="form-control" id=class name="gender" placeholder="gender">--%>
            </div>
        </div>
        <div class="form-group">
            <label for="class" class="col-sm-2 control-label">班级</label>
            <div class="col-sm-10">
                <select type="text" class="form-control" id=class name="banjiId" placeholder="banji">
                    <option value="1">未选定</option>
                    <%
                        for(Banji banji : list){
                    %>
                            <option value="<%=banji.getId()%>"><%=banji.getName()%></option>
                    <%
                        }
                    %>
                </select>
<%--                <input type="text" class="form-control" id=class name="gender" placeholder="gender">--%>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default">添加</button>
            </div>
        </div>
    </form>
</body>
</html>
